<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="include/base.jsp" %>

<!DOCTYPE html>
<!-- saved from url=(0036)http://192.168.0.77/pms/project.html -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="${basePath }/css/bootstrap.min.css">
	<script type="text/javascript" src="${basePath }/js/jquery-1.8.2.min.js"></script>
	<script type="text/javascript" src="${basePath }/js/bootstrap.min.js"></script>
	<style type="text/css">
		.navbar .dropdown-menu:after {
			left:120px;
		}
	</style>
</head>
<body class="body">
	
	<jsp:include page="include/top.jsp"/>	

	
	<div class="container">
	  <div class="row">
		
		<jsp:include page="include/side.jsp">
			<jsp:param value="information" name="tag"/>
		</jsp:include>
		
		<div class="span6">
		  
		  	<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;">
				<li class="active">
					<i class="icon-th"></i>你在想什么？
				</li>
			</ul>
			<div class="wall">
				<form style="margin:0px" onsubmit="return false">
					<textarea name="info-des" id="info-des" style="width:415px" rows="3"></textarea>
					<button class="btn btn-primary" id="btn">发布</button>
				</form>
			</div>


			<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:20px">
				<li class="active">
					<i class="icon-th"></i>信息流
				</li>
			</ul>
			<div class="wall">
				<blockquote id="info">
				
				</blockquote>
				
				<c:forEach items="${informationList }" var="i">
					${i.i_content }
				</c:forEach>
				
			</div>

		</div>
		<div class="span3">
			<div class="box">
				<div class="head">我的任务</div>
				<ul>
					<c:forEach items="${taskList }" var="task">
						<li><a href="${basePath }/task/toTask?id=${task.goal.id}">${task.t_name }</a></li>
					</c:forEach>
				</ul>
			</div>
		</div>
	  </div>
	</div>
	<script type="text/javascript">
		$("#btn").click(function(){
			if($("#info-des").val().trim() != ""){
				
				$.post("${basePath }/information/save",{"des":$("#info-des").val().trim()},function(obj){
					$("#info-des").val(" ");
					//alert(obj.i_content);
					//添加
					$("#info").after(obj.i_content);
				});
			}else{
				alert("不能为空");
			}
		});
		//删除
		function delinfo(obj){
			var id = $(".i_id").val();
			//alert(id);
			$.post("${basePath}/information/del",{"id":id},function(){
				//alert(obj);
				$(obj).parent().parent().remove();
			});
		}
	</script>
</body></html>
